﻿using AbpVnext_Module.Model;
using Ebusiness_Domain.Model;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;

namespace AbpVnext_Module.DBContext
{
    /// <summary>
    /// Abp DbContext
    /// DefaultConnection 数据库连接字符串
    /// </summary>
    //[ConnectionStringName("DefaultConnection")]
    [ConnectionStringName("ProductImage")]
    public class ProjectDbContext: AbpDbContext<ProjectDbContext>
    {
        public ProjectDbContext(DbContextOptions<ProjectDbContext> options) : base(options)
        {

        }

        /// <summary>
        /// 设置日志是否显示
        /// </summary>
        /// <param name="optionsBuilder"></param>
        //protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        //{
        //    base.OnConfiguring(optionsBuilder);
        //    optionsBuilder.UseLoggerFactory(null);
        //}

        /// <summary>
        /// 配置商品模型
        /// </summary>
        public DbSet<Product> Product { set; get; }

        public DbSet<ProductImage> productImages { set; get; }

        public DbSet<ProductImageOrder> ProductImageOrder { set; get; }

        //public DbSet<Order> Order { get; set; }
    }
}
